import { ClientMessage } from "@runtime/generate/message/ClientMessage";
import MessageHandler from "@runtime/module/Handler/MessageHandler";
import AssetLoaderComponent from "@runtime/UnityEngineBridge/AssetLoaderComponent";

/**
 * 资源加载进度消息处理
 */
export default class LoadAllAssetProgressMessageHandler extends MessageHandler<ClientMessage.LoadAllAssetProgressMessage> {
    protected async RunAsync(message: ClientMessage.LoadAllAssetProgressMessage): Promise<void> {
        AssetLoaderComponent.Default.Progress.value = message.Progress;
    }
}